from concurrent.futures import ThreadPoolExecutor


def run1(i):
    # 抓取的页面url
    print("run1", i)
    pass

pool = ThreadPoolExecutor(5) #线程并发的属性

# 把任务放入线程池

# for i in range(1,6):
#     pool.submit(run1, i)

#pool.map(run1, range(1,5))

tasks = [pool.submit(run1, i) for i in range(1,5)]

print(tasks)
pool.shutdown()
print("over")